<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-group-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">用户组：</label>
                    <div class="col-sm-8">
                        <input name="groupname"  class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">最低文档数：</label>
                    <div class="col-sm-8">
                        <input name="docnum"  class="form-control" type="text">
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required ">提现利率：</label>
                    <div class="col-sm-8">
                        <input name="divide"  class="form-control" type="text">
                    </div>
                </div>
            </div>

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">上传数量限制：</label>
                    <div class="col-sm-8">
                        <input name="uploadcount"  class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">上传大小限制：</label>
                    <div class="col-sm-8">
                        <input name="uploadsize"  class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">上传格式限制：</label>
                    <div class="col-sm-8">
                        <input name="uploadexten"  class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">下载数量限制：</label>
                    <div class="col-sm-8">
                        <input name="downcount"  class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">序号：</label>
                    <div class="col-sm-8">
                        <input name="sort"  class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/group"
        $("#form-group-add").validate({
            focusCleanup: true,
            rules:{
                groupname: "required",
                docnum: {
                    number:true
                },
                divide: "required",
                uploadsize:{
                    number:true
                },
                uploadcount:{
                    number:true
                },
                downcount:{
                    number:true
                }

            }
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-group-add').serialize());
            }
        }

    </script>
</body>
</html>